package com.exception;

import com.component.ErrorCode;

/**
 * @ClassName UserException
 * @Description 用户异常调用
 * @Author XiangQian
 * @Date 2022/7/7 17:04
 */
public class UserException extends RuntimeException{
    private final ErrorCode errorCode;
    public UserException(ErrorCode errorCode) {
        super("ErrorCode is:" + errorCode.getCode());
        this.errorCode = errorCode;
    }
    public ErrorCode getErrorCode() {
        return this.errorCode;
    }
}
